package com.sunfeng.chap1;

import java.nio.ByteBuffer;

public class Test51 {
    public static void main(String[] args) {
        byte[] bytes = new byte[]{'a', 'b', 'c', 'd','e'};
        ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);
        System.out.println(byteBuffer.capacity());
        System.out.println();
        byteBuffer.position(1).mark();
        System.out.println(byteBuffer.position());
        byteBuffer.position(2);
        byteBuffer.reset();
        System.out.println(byteBuffer.position());
    }
}
